<template>
	<view class="content" v-if="data">
		<view class="title u-font-32 u-text-center u-padding-top-40 u-padding-bottom-10">{{data.title}}</view>
		<view class="time u-font-24 u-text-center u-padding-bottom-35 u-margin-bottom-40">{{data.create_time}}</view>
        <u-parse :html="data.content"></u-parse>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				data: {},
			}
		},
		onLoad(option) {
			this.id = option.id;
			this.getData();
		},

		methods: {
			
			getData() {
				this.$ajax('broadcasts_detail', {
                    userToken: this.$getSync('userToken'),
					content_id: this.id,
				}).then(ret => {
					if (ret.status == 0) {
						this.data = ret.data;
					} else {
						this.$toast(ret.message);
					}
				});
			},
		}
	}
</script>

<style lang="scss">
	page {
		background: #ffffff;
	}

	.content {
		border-top: 2rpx solid #e6e6e6;
		padding: 0 30rpx 50rpx;
	}

	.title {
		font-weight: bold;
	}

	.time {
		color: #666666;
        border-bottom: 2rpx solid #e6e6e6;
	}

</style>
